cmake_minimum_required(VERSION 2.8)



#project RaytracerApp

project(RaytracerApp)


set(LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/builds/lib/")



#Generate a list of source files

file(
	
	GLOB_RECURSE
	
	source_files
	
	src/*.cpp
)



file(
	
	GLOB_RECURSE
	
	public_header_files
	
	publicInterfaces/*.h

)



file(
	
	GLOB_RECURSE
	
	private_header_files
	
	privateInterfaces/*.h

)



include_directories(publicInterfaces)

include_directories(privateInterfaces)



#include needed module
include_directories(../Math/publicInterfaces)
include_directories(../Objects/publicInterfaces)
include_directories(../Image/publicInterfaces)
include_directories(${Boost_INCLUDE_DIRS})

if(WIN32)
	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ox /Ot /GL")
else()
	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
endif()


#create the library

add_library(
	
	RaytracerApp
	
	STATIC
	
	${source_files}
	
	${public_header_files}
	
	${private_header_files}	

)


#Link

target_link_libraries(
	RaytracerApp
	Math
	Objects
	Image
	${Boost_LIBRARIES}
)